<template>
  <div class="my_cart">
     <input type="checkbox" @change="$emit('childFtn')" v-model="itemObj.checked">
     <img :src="itemObj.img" alt="">
     <section>
         <p>{{itemObj.name}}</p>
         <p>
            <span style="color:red">￥{{itemObj.price}}</span>
            <van-stepper v-model="itemObj.num" />
         </p>
     </section>
  </div>
</template>

<script>
import { ref, reactive, toRefs } from "vue";
export default {
  props:{
    itemObj:Object
  },
  setup() {},
};
</script>
<style lang="scss" scoped>
.my_cart{
  background: #fff;
  padding: 10px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  img{
    width: 80px;
    margin: 0 10px;
  }
  section{
    flex: 1;
    .van-stepper{
      float: right;
    }
  }
}
</style>